1. Field of the Invention
The present invention relates to an image processing apparatus, a control method, and a storage medium.
2. Description of the Related Art
A conventional image processing apparatus obtains a plurality of images (image data) captured by an image capturing apparatus such as a digital still camera or a digital video camera and pastes the plurality of images in an output region such as a monitor (display screen) or a pasteboard, thereby creating a digital album.
In the digital album creation, each of the plurality of images is automatically laid out at a predetermined position of the output region. In this case, the images are laid out in the output region independently of their contents (i.e., without considering the showing of the image layout). This may make a user (appreciator) have a sense of incongruity in the image layout.
The user may lay out the images in the output region while taking the showing of the image layout into consideration. However, if there is an enormous number of images, selecting images based on the contents and determining their layout positions in the output region is extremely laborious and time-consuming.
Several image processing apparatuses have been proposed to create a digital album in consideration of the showing of image layout.
Japanese Patent Laid-Open No. 2006-277729 discloses a technique which extracts a frame image from a moving image, detects the transverse moving direction of a main object based on the change of the positional relationship between the main object and a background object, and determines trimming and a layout in an output region in accordance with the moving direction.
Japanese Patent Laid-Open No. 2006-304265 discloses a technique which calculates the direction components of an image and determines a layout in an output region based on the direction components.
Japanese Patent Laid-Open No. 2005-100338 discloses a technique of determining a layout in an output region based on the information of time when an image has been captured.
Japanese Patent Laid-Open No. 2006-277729 detects the moving direction of the main object based on the relative positional relationship between the main object and a background object. In this case, it is difficult to obtain the main object moving direction in the depth direction of the main object and the image capturing apparatus. In Japanese Patent Laid-Open No. 2006-277729, it is therefore impossible to determine an ideal layout in accordance with the depth-direction relative positional relationship between the main object and the image capturing apparatus. Note that the ideal layout is a layout that expresses the relative positional relationship between the main object and the image capturing apparatus. More specifically, in the ideal layout, an image having a closer relative positional relationship between the main object and the image capturing apparatus is displayed in a larger size. Alternatively, when overlaying a plurality of images, an image having a closer relative positional relationship between the main object and the image capturing apparatus is displayed on the near side.
Japanese Patent Laid-Open No. 2006-304265 calculates the direction components of an object in an image using, for example, the object's edge information obtained by spatial frequency analysis. In this case, it is difficult to obtain the main object moving direction in the depth direction of the main object and the image capturing apparatus. In Japanese Patent Laid-Open No. 2006-304265, it is therefore impossible to determine an ideal layout in accordance with the depth-direction relative positional relationship between the main object and the image capturing apparatus, as in the Japanese Patent Laid-Open No. 2006-277729.
Japanese Patent Laid-Open No. 2005-100338 can realize a layout that expresses the passage of time. However, the user may feel incongruity because the relative positional relationship between the main object and the image capturing apparatus is not taken into consideration. For example, a plurality of images obtained by capturing the movement of the main object that comes closer to the image capturing apparatus and a plurality of images obtained by capturing the movement of the main object that moves away from the image capturing apparatus are arranged in the same time-base layout. In this case, an image having a farther relative positional relationship between the main object and the image capturing apparatus may be displayed in a large size. Alternatively, when overlaying a plurality of images, an image having a farther relative positional relationship between the main object and the image capturing apparatus may be displayed on the near side. This produces incongruous feeling for the user.
Japanese Patent Laid-Open No. 2004-362403 discloses a technique of determining the ratio of image overlay regions in a layout using focal length information held in the header information of image data obtained by a digital still camera. However, image data generated by converting a photo taken by a silver halide camera into digital data using a scanner or the like has no header information. For this reason, the prior art cannot realize a layout considering the perspective and depth feel.